import 'package:aio/aio.dart';
import 'package:app/src/http/bean/wroks/contract_bean.dart';

///免款审核；免款信息
class PayFree extends ContractCopyInfo {
  //是否已对账
  String? IsCheck = "";

  bool isCheck() {
    return BoolUtils.isBoolWithStr(IsCheck);
  }

  //免款说明
  String? Intro = "";

  @override
  fromJson(Map<String, dynamic> json) {
    super.fromJson(json);
    // TODO: implement fromJson
    IsCheck = json['IsCheck']?.toString() ?? "";
    Intro = json['Intro']?.toString() ?? "";
    // json?.forEach((key, value) {
    //   print("key:$key\tvalue:\t$value");
    // });
  }

  @override
  instance() {
    // TODO: implement instance
    return PayFree();
  }

  @override
  Map<String, dynamic> toJson() {
    // TODO: implement toJson
    var map = super.toJson();
    //var map = <String, dynamic>{};
    map["IsCheck"] = IsCheck;
    map["Intro"] = Intro;
    return map;
  }
}

///免款审核；免款明细
class PayFreeDetail extends BaseBean {
  //订单编号
  String? OrderCode = "";

  //对账单号
  String? StatementCode = "";

  //货品名称
  String? ProductName = "";

  //规格型号
  String? Width_Height = "";

  //数量/原数量/总数量
  String? Num = "";

  //免款数量
  String? CutNum = "";

  //面积/总面积
  String? SumArea = "";

  //发货金额
  String? Amount = "";

  //原单价/单价
  String? Price = "";

  // 免款金额/已免款金额
  String? Amount1 = "";

  //架卡号
  String? PositionCode = "";

  //收货金额
  String? Amount3 = "";

  //是否开票
  String? IsReceipt = "";

  //开始时间
  String? SDate = "";

  //截止时间
  String? EDate = "";

  //减免单价
  String? CutPrice = "";

  //减免金额
  String? ThisCutMoney = "";

  //退货分类
  String? HandleMode = "";

  //退货数量
  String? ReturnNum = "";

  //退货金额
  String? Amount2 = "";

  //入库单号
  String? StockInCode = "";

  //减免后单价
  String? AfterPrice = "";

  //减免后金额
  String? AfterAmount = "";

  //减免后特殊加工费
  String? AfterOtherAmount = "";

  //特殊加工费
  String? SumOtherAmount = "";

  //发货时间
  String? DeliveryDatetime = "";

  @override
  fromJson(Map<String, dynamic> json) {
    // TODO: implement fromJson
    OrderCode = json['OrderCode']?.toString() ?? "";
    StatementCode = json['StatementCode']?.toString() ?? "";
    ProductName = json['ProductName']?.toString() ?? "";
    Width_Height = json['Width_Height']?.toString() ?? "";
    Num = json['Num']?.toString() ?? "";
    CutNum = json['CutNum']?.toString() ?? "";
    SumArea = json['SumArea']?.toString() ?? "";
    Amount = json['Amount']?.toString() ?? "";
    Price = json['Price']?.toString() ?? "";
    Amount1 = json['Amount1']?.toString() ?? "";
    PositionCode = json['PositionCode']?.toString() ?? "";
    Amount3 = json['Amount3']?.toString() ?? "";
    IsReceipt = json['IsReceipt']?.toString() ?? "";
    SDate = json['SDate']?.toString() ?? "";
    EDate = json['EDate']?.toString() ?? "";
    CutPrice = json['CutPrice']?.toString() ?? "";
    ThisCutMoney = json['ThisCutMoney']?.toString() ?? "";
    HandleMode = json['HandleMode']?.toString() ?? "";
    ReturnNum = json['ReturnNum']?.toString() ?? "";
    Amount2 = json['Amount2']?.toString() ?? "";
    StockInCode = json['StockInCode']?.toString() ?? "";
    AfterPrice = json['AfterPrice']?.toString() ?? "";
    AfterAmount = json['AfterAmount']?.toString() ?? "";
    AfterOtherAmount = json['AfterOtherAmount']?.toString() ?? "";
    SumOtherAmount = json['SumOtherAmount']?.toString() ?? "";
    DeliveryDatetime = json['DeliveryDatetime']?.toString() ?? "";
    // json?.forEach((key, value) {
    //   print("key:$key\tvalue:\t$value");
    // });
  }

  @override
  instance() {
    // TODO: implement instance
    return PayFreeDetail();
  }

  @override
  Map<String, dynamic> toJson() {
    // TODO: implement toJson
    var map = <String, dynamic>{};
    map["OrderCode"] = OrderCode;
    map["StatementCode"] = StatementCode;
    map["ProductName"] = ProductName;
    map["Width_Height"] = Width_Height;
    map["Num"] = Num;
    map["CutNum"] = CutNum;
    map["SumArea"] = SumArea;
    map["Amount"] = Amount;
    map["Price"] = Price;
    map["Amount1"] = Amount1;
    map["PositionCode"] = PositionCode;
    map["Amount3"] = Amount3;
    map["IsReceipt"] = IsReceipt;
    map["SDate"] = SDate;
    map["EDate"] = EDate;
    map["CutPrice"] = CutPrice;
    map["ThisCutMoney"] = ThisCutMoney;
    map["HandleMode"] = HandleMode;
    map["ReturnNum"] = ReturnNum;
    map["Amount2"] = Amount2;
    map["StockInCode"] = StockInCode;
    map["AfterPrice"] = AfterPrice;
    map["AfterAmount"] = AfterAmount;
    map["AfterOtherAmount"] = AfterOtherAmount;
    map["SumOtherAmount"] = SumOtherAmount;
    map["DeliveryDatetime"] = DeliveryDatetime;
    return map;
  }
}
